package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RecoveryMapper;
import com.ruoyi.system.domain.Recovery;
import com.ruoyi.system.service.IRecoveryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 回收 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-07
 */
@Service
public class RecoveryServiceImpl implements IRecoveryService 
{
	@Autowired
	private RecoveryMapper recoveryMapper;

	/**
     * 查询回收信息
     * 
     * @param id 回收ID
     * @return 回收信息
     */
    @Override
	public Recovery selectRecoveryById(Long id)
	{
	    return recoveryMapper.selectRecoveryById(id);
	}
	
	/**
     * 查询回收列表
     * 
     * @param recovery 回收信息
     * @return 回收集合
     */
	@Override
	public List<Recovery> selectRecoveryList(Recovery recovery)
	{
	    return recoveryMapper.selectRecoveryList(recovery);
	}
	
    /**
     * 新增回收
     * 
     * @param recovery 回收信息
     * @return 结果
     */
	@Override
	public int insertRecovery(Recovery recovery)
	{
	    return recoveryMapper.insertRecovery(recovery);
	}
	
	/**
     * 修改回收
     * 
     * @param recovery 回收信息
     * @return 结果
     */
	@Override
	public int updateRecovery(Recovery recovery)
	{
	    return recoveryMapper.updateRecovery(recovery);
	}

	/**
     * 删除回收对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteRecoveryByIds(String ids)
	{
		return recoveryMapper.deleteRecoveryByIds(Convert.toStrArray(ids));
	}
	
}
